package com.qin.thread;

import com.qin.entity.ExecuteBean;
import com.qin.service.ExecuteService;
import com.qin.service.impl.ExecuteServiceImpl;

public class ExecuteFunctionThread extends Thread{

    ExecuteBean executeBean;

    public ExecuteFunctionThread(ExecuteBean executeBean) {
        this.executeBean = executeBean;
    }

    @Override
    public void run() {
        String threadName = this.getName();
        System.out.println("【"+threadName+"】ExecuteFunctionThread执行开始");

        //调用service层
        ExecuteService executeService = new ExecuteServiceImpl();
        String retString = executeService.executeFunction(executeBean).toString();

        System.out.println("执行结果：" + retString);

        System.out.println("【"+threadName+"】ExecuteFunctionThread执行结束");
    }
}
